{#{% extends 'base1.html' %}#}
{% load staticfiles %}
{% block title %}历史成绩{% endblock %}

{% block css %}
<!-- jQuery 2.2.3 -->
<script src="{% static 'plugins/jQuery/jquery-2.2.3.min.js' %}"></script>
<!-- jQuery UI 1.11.4 -->
<script src="{% static 'plugins/jQueryUI/jquery-ui.min.js' %}"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
  $.widget.bridge('uibutton', $.ui.button);
</script>
      <!-- Bootstrap 3.3.6 -->
  <link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap.min.css' %}">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="{% static 'plugins/font-awesome-4.6.3/css/font-awesome.min.css' %}">
  <!-- Ionicons -->
  <link rel="stylesheet" href="{% static 'plugins/ionicons-2.0.1/css/ionicons.min.css' %}">

<!-- DataTables -->
  <link rel="stylesheet" href="{% static 'plugins/datatables/dataTables.bootstrap.css' %}">
  <!-- Theme style -->
  <link rel="stylesheet" href="{% static 'dist/css/AdminLTE.min.css' %}">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="{% static 'dist/css/skins/_all-skins.min.css' %}">
        <link rel="stylesheet" type="text/css" href="{% static 'css/reset.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/animate.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}">

{% endblock %}


<section class="headerwrap ">
    <header>
        <div class=" header">
            <div class="top">
                <div class="wp">
                    <div  class="fl"><p><a style="color: white;font-size: 18px;" href="https://zhangbinchao.github.io/"><b>我的博客地址</b></a></p></div>
                    <!--登录后跳转-->

                    {% if request.user.is_authenticated %}
                        <div class="personal">
                            <dl class="user fr">
                                <dd>{{ user.username }}<img class="down fr"
                                                            src="{% static "images/top_down.png" %}"/></dd>
                                <dt><img width="20" height="20" src="{{MEDIA_URL}}{{ request.user.image }}"/></dt>
                            </dl>
                            <div class="userdetail">
                                <dl>
                                    <dt><img width="80" height="80" src="{{ MEDIA_URL }}{{ request.user.image }}"/></dt>
                                    <dd>
                                        <h2>{{ request.user.nick_name }}</h2>
                                        <p>{{ request.user.username }}</p>
                                    </dd>
                                    </dd>
                                </dl>
                                <div class="btn">
                                    <a class="personcenter fl" href="{% url 'users:user_info' %}">进入个人中心</a>
                                    <a class="fr" href="{% url 'logout' %}">退出</a>
                                </div>
                            </div>
                        </div>
                    {% else %}
                        <a style="color:white" class="fr registerbtn" href="{% url 'register' %}">注册</a>
                        <a style="color:white" class="fr loginbtn" href="{% url 'login' %}">登录</a>
                    {% endif %}


                </div>
            </div>

            <div class="middle">
                <a href="/"><img class="fl" src="{% static 'images/logo.jpg' %}"/></a>
            </div>


            <nav>
                <div class="nav">
                    <div class="wp">
                        <ul>
                            <li {% if request.path == '/' %}class="active" {% endif %}><a
                                    href="{% url 'index' %}">首页</a></li>

                        </ul>
                    </div>
                </div>
            </nav>

        </div>
    </header>
</section>

{% block content %}

    <!-- Content Header (Page header) -->
{#    <section class="content-header">#}
{#      <h1>#}
{#        历史成绩#}
{##}
{#      </h1>#}
{##}
{#    </section>#}

    <!-- Main content -->
    <section class="content">
    <div class="row">
    <div class="col-xs-12">

      <div class="box">
        <div class="box-header">
          <h3 class="box-title">历史成绩</h3>
        </div>
        <!-- /.box-header -->
        <div class="box-body">
          <table id="assets_table" class="table table-bordered table-striped">
            <thead>
            <tr>
              <th>序号</th>
              <th>成绩</th>

              <th>考试时间</th>
              <th>试卷名</th>
                <th>考生姓名</th>
            </tr>
            </thead>
            <tbody>

                {% for his in hiss %}
                <tr>
                  <td>{{ forloop.counter }}</td>
                  <td>{{ his.score }}</td>
                  <td>{{ his.add_time }}</td>
                  <td>{{ his.paper_id }}</td>
                    <td>{{ his.user_id }}</td>
                </tr>
                {% empty %}
                  <tr>没有数据！</tr>
                {% endfor %}

            </tbody>
            <tfoot>
            <tr>
              <th>序号</th>
              <th>成绩</th>
              <th>考试时间</th>
              <th>试卷名</th>
                <th>考生姓名</th>
            </tr>
            </tfoot>
          </table>
        </div>
        <!-- /.box-body -->
      </div>
      <!-- /.box -->
    </div>
    <!-- /.col -->
    </div>
    <!-- /.row -->
    </section>

{% endblock %}

{% block script %}
    <!-- Bootstrap 3.3.6 -->
<script src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script>
    <!-- DataTables -->
    <script src="{% static 'plugins/datatables/jquery.dataTables.min.js' %}"></script>
    <script src="{% static 'plugins/datatables/dataTables.bootstrap.min.js' %}"></script>

    <!-- SlimScroll -->
    <script src="{% static 'plugins/slimScroll/jquery.slimscroll.min.js' %}"></script>
    <!-- FastClick -->
    <script src="{% static 'plugins/fastclick/fastclick.js' %}"></script>
    <!-- AdminLTE App -->
    <script src="{% static 'dist/js/app.min.js' %}"></script>
    <!-- AdminLTE for demo purposes -->
    <script src="{% static 'dist/js/demo.js' %}"></script>

    <!-- DataTable buttons -->
    <script src="{% static  'plugins/datatables/button/dataTables.buttons.min.js'%}"></script>
    <script src="{% static  'plugins/datatables/button/buttons.bootstrap.min.js'%}"></script>
    <!-- buttons 打印功能 -->
    <script src="{% static  'plugins/datatables/button/buttons.print.min.js'%}"></script>
    <!-- buttons 导出功能 -->
    <script src="{% static  'plugins/datatables/button/buttons.html5.min.js'%}"></script>
    <script src="{% static  'plugins/datatables/button/jszip.min.js'%}"></script>
    <!-- buttons 生成PDF功能 -->
{#    <script src="{% static  'plugins/datatables/button/pdfmake.min.js'%}"></script>#}
{#    <script src="{% static  'plugins/datatables/button/vfs_fonts.js'%}"></script>#}

    <!-- page script -->
    <script>
      $(function () {
        $('#assets_table').DataTable({
          "paging": true,       <!-- 允许分页 -->
          "lengthChange": true, <!-- 允许改变每页显示的行数 -->
          "searching": true,    <!-- 允许内容搜索 -->
          "ordering": true,     <!-- 允许排序 -->
          "info": true,         <!-- 显示信息 -->
          "autoWidth": false,    <!-- 固定宽度 -->
          language:{
              'sSearch':"搜索",
              "info":           "显示 _START_ 到 _END_ 页共 _TOTAL_ 条",
              "infoEmpty":      "显示 0 到 0 页共 0 条",
              "lengthMenu":     "显示 _MENU_ 条",
              "zeroRecords":    "没有匹配项",
          "paginate": {
              "first":      "First",
              "last":       "Last",
              "next":       "下页",
              "previous":   "上页"
          },
          },
          dom: '<"pull-left"B>ft<"pull-left"i>p',
        buttons: [
            {
                text: '<i class="glyphicon glyphicon-copy" title="复制"></i>',
                extend: 'copy'
            }, {
                text: '<i class="glyphicon glyphicon-print" title="打印"></i>',
                extend: 'print'
            }, {
                text: '<i class="glyphicon glyphicon-list-alt" title="导出csv"></i>',
                extend: 'csv'
            },
        ],




{#"stripeClasses": [ 'strip1', 'strip2', 'strip3' ],#}
{#columnDefs: [#}
{#  {#}
{#        targets: -1,#}
        {#visible: false,#}
{#        sortable: false,#}
        {#data : null,#}
{#        render: function(data, type, row){#}
{#            return '<a href="" title="详情">' +#}
{#            '<i class="glyphicon glyphicon-eye-open"></i> ' +#}
{#            '</a>'+#}
{#            '<a href="/assets/edit/" data-toggle="modal" data-id="' + row.p_id +'" title="修改">' +#}
{#            '<i class="glyphicon glyphicon-pencil"></i> ' +#}
{#            '</a>'+#}
{#            '<a href="#delProject" data-toggle="modal" data-id="' + row.p_id +'" title="删除">' +#}
{#            '<i class="glyphicon glyphicon-trash text-danger"></i> ' +#}
{#            '</a>';#}
{#        }#}
{#    }#}
{#],#}



        });
        $.fn.dataTable.ext.buttons.reload = {
    text: '<i class="glyphicon glyphicon-refresh"></i>',
    action: function ( e, dt, node, config ) {
        dt.ajax.reload();
    }
};


      });

    </script>

    <script src="{% static 'js/selectUi.js' %}" type='text/javascript'></script>
<script src="{% static 'js/deco-common.js' %}" type='text/javascript'></script>
<script type="text/javascript" src="{% static 'js/plugins/laydate/laydate.js' %}"></script>
<script src="{% static 'js/plugins/layer/layer.js' %}"></script>
<script src="{% static 'js/plugins/queryCity/js/public.js' %}" type="text/javascript"></script>
<script src="{% static 'js/unslider.js' %}" type="text/javascript"></script>
<script src="{% static 'js/plugins/jquery.scrollLoading.js' %}" type="text/javascript"></script>
<script src="{% static 'js/deco-common.js' %}" type="text/javascript"></script>
{% endblock %}

<footer>
    <div class="footer">
{#        <p class="line"></p>#}
        <div class="wp clear">
            <span class="fl">Version: 2.0</span>
            <span class="fr">copyright: bc_zhang 2019</span>
        </div>
    </div>
</footer>

<section>
    <ul class="sidebar">
        <li class="totop"></li>
    </ul>
</section>